package day04;

public class GenEx08 {                          //二维数组计算营业额
    public static void main(String[] args) {
        int[][] turnover={{22,66,44},{77,33,88},{25,45,65},{11,66,99}};
        int sumYear=0;
        for(int i=0;i<turnover.length;i++){
            int sumQuarter=0;
            for(int j=0;j<turnover[i].length;j++){
                sumQuarter+=turnover[i][j];
            }
            sumYear+=sumQuarter;
            System.out.println("第"+(i+1)+"季度营业额为"+sumQuarter);
        }
            System.out.println("全年营业额为"+sumYear);
    }
}
